import type { RouteRecordRaw } from "vue-router";
import { 
  AppstoreOutlined, 
  AuditOutlined, 
  BankOutlined, 
  BarsOutlined, 
  BulbOutlined, 
  FileAddOutlined, 
  FileSearchOutlined,
  PartitionOutlined,
  ProjectOutlined, 
  ScheduleOutlined, 
  SolutionOutlined, 
  TeamOutlined } from '@ant-design/icons-vue';

export default <RouteRecordRaw[]>[
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/index.vue'),
    meta:
    {
      title: '管理首页',
      icon: AppstoreOutlined,
    },
  },
  //待办任务
  {
    path: '/task',
    name: 'TaskList',
    component: () => import('@/views/task/index.vue'),
    meta:
    {
      title: '待办任务',
      icon: ScheduleOutlined,
    },
  },
  //项目管理
  {
    path: '/project',
    name: 'ProjectList',
    component: () => import('@/views/project/index.vue'),
    meta:
    {
      title: '项目管理',
      icon: ProjectOutlined,
    },
  },
  {
    path: '/order',
    name: 'Order',
    meta:
    {
      title: '订单管理',
      icon: SolutionOutlined,
    },
    children: [
      {
        path: '/order',
        name: 'OrderList',
        component: () => import('@/views/order/index.vue'),
        meta:
        {
          title: '订单列表',
          icon: BarsOutlined,
        },
      },
      {
        path: '/order/create',
        name: 'OrderCreate',
        component: () => import('@/views/order/create.vue'),
        meta:
        {
          title: '创建订单',
          icon: FileAddOutlined,
        },
      },
      {
        path: '/order/file-explorer',
        name: 'FileExplorer',
        component: () => import('@/views/order/FileExplorer.vue'),
        meta:
        {
          title: '文件识别',
          icon: FileSearchOutlined,
        },
      },
    ]
  },

  {
    //客户管理
    path: '/customer',
    name: 'Customer',
    component: () => import('@/views/customer/index.vue'),
    meta:
    {
      title: '客户管理',
      icon: TeamOutlined,
    },
  },
  {
    path: '/product',
    name: 'Product',
    meta:
    {
      title: '产品物料',
      icon: AppstoreOutlined
    },
    children:[
      {
        path: '/product',
        name: 'ProductList',
        component: () => import('@/views/product/index.vue'),
        meta:{title: '产品列表',icon: BarsOutlined}
      },
      {
        path: '/product/customer',
        name: 'CustomerQuotedPrice',
        component: () => import('@/views/product/customer.vue'),
        meta: { title: '客户报价', icon: AuditOutlined },
      },
      {
        path: '/product/create',
        name: 'ProductAdd',
        component: () => import('@/views/product/create.vue'),
        meta:{title: '添加产品',hidden:true}
      },
      {
        path: '/product/category',
        name: 'CategoryList',
        component: () => import('@/views/product/category.vue'),
        meta: { title: '产品分类', icon: PartitionOutlined }
      },
      {
        path: '/product/units',
        name: 'ProductUnits',
        component: () => import('@/views/product/units.vue'),
        meta: { title: '计价单位', icon: BulbOutlined }
      },
      //供应商管理
      {
        path: '/product/supplier',
        name: 'Supplier',
        component: () => import('@/views/product/supplier.vue'),
        meta: { title: '供应商', icon: BankOutlined },
      },
    ]
  },
]